package com.hd.core.project.module.domain;

import com.baomidou.mybatisplus.annotations.TableField;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.hd.core.framework.aspectj.lang.annotation.Excel;
import com.hd.core.project.system.dept.domain.Dept;
import com.hd.core.project.system.user.domain.User;

import java.util.Map;

/**
 * 为了不破坏项目框架原有的代码结构所以这里使用继承的方式
 */
@TableName("sys_user")
@SuppressWarnings("all")
public class ModuleUser extends User {

    @Excel(name = "用户序号")
    @TableId(type = IdType.AUTO)
    private Long userId;

    /**
     * 是否为班主任 N: no Y: yes
     */
    private Character masterTeacherFlag;

    /**
     * 以下是继承过来的成员属性,但是数据库中有不存在的字段
     * 所有都覆盖排除掉
     */
    @TableField(exist = false)
    private Dept dept;

    @TableField(exist = false)
    private Long parentId;

    @TableField(exist = false)
    private Long[] roleIds;

    @TableField(exist = false)
    private Long[] postIds;

    @TableField(exist = false)
    private String searchValue;

    @TableField(exist = false)
    private Map<String, Object> params;

    public Character getMasterTeacherFlag() {
        return masterTeacherFlag;
    }

    public void setMasterTeacherFlag(Character masterTeacherFlag) {
        this.masterTeacherFlag = masterTeacherFlag;
    }
}
